package com.rw;

import com.rw.pojo.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationcontext.xml");
//        Student stu = (Student) ac.getBean("stu");
//        System.out.println(stu);
//        Student stu2 = (Student) ac.getBean("stu2");
//        System.out.println(stu2);
        System.out.println("-------------");
        Student stu3 = (Student) ac.getBean("stu3");
        Student stu4 = (Student) ac.getBean("stu3");
        System.out.println(stu3 == stu4);

    }

}
